<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<title>AXL Tutorial: TranzAm</title>
	<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!-- menu -->
	<div id="navmain">
	<ul>
		<li><a href="index.html">Overview</a></li>
		<li><a href="install.html">Installation</a></li>
		<li><a href="config.html">Configurator</a></li>
		<li><a href="animation.html">Animation</a></li>
		<li><a href="framework.html">Framework</a></li>
		<li><a href="tranzam.html">Tutorial</a></li>
	</ul>
	</div>
	<div id="navsub">
	<ul>
		<li><a href="#intro">Start</a></li>
		<li><a href="tranzam_a1.html">Article 1</a></li>
		<li><a href="tranzam_a2.html">Article 2</a></li>
		<li><a href="tranzam_a3.html">Article 3</a></li>
		<li><a href="tranzam_a4.html">Article 4</a></li>
		<li><a href="tranzam_a5.html">Article 5</a></li>
		<li><a href="tranzam_a6.html">Article 6</a></li>
		<li><a href="tranzam_a7.html">Article 7</a></li>
		<li><a href="tranzam_a8.html">Article 8</a></li>
		<li><a href="tranzam_a9.html">Article 9</a></li>
		<li><a href="tranzam_a10.html">Article 10</a></li>
		<li><a href="tranzam_a10.html">Article 11</a></li>
	</ul><span class="smallprint">This menu will stay fixed with a proper browser.</span>
	<p>
	 <a href="http://jigsaw.w3.org/css-validator/">
	  <img style="border:0;width:88px;height:31px"
		   src="http://jigsaw.w3.org/css-validator/images/vcss" 
		   alt="Valid CSS!" />
	 </a>
	</p>
	<p>
      <a href="http://validator.w3.org/check?uri=referer"><img
          src="http://www.w3.org/Icons/valid-xhtml10"
          alt="Valid XHTML 1.0!" height="31" width="88" /></a>
    </p>
<p><a href="http://www.bloggerheads.com/bbc/"><img src="http://www.bloggerheads.com/bbc/bbc.gif" width="90" height="45"  
alt="Click here to find out why." /></a></p>
<p><a href="http://retrospec.sgn.net" ><img src="retrospec.gif" width="150" alt="Fine games" /></a></p>
	</div>
<!-- menu -->

	<a name="intro"></a>
	<div id="main">
	<a name="intro"></a>
	<h1>Introduction</h1>
	<img style="float:right; padding-left:10px" src="images/tranzam.gif" />
	What better way to code a game tutorial than to have the complete design all made for you.<br />Tranz Am is a game released
	about 1983 by Ultimate (now, Rare).<br />It's a simple game of driving across the barren American wilderness in the year 3472 
	(i.e. it called for minimal graphics and coding, and America seemed cool in a bleak 1980's Britain). The object of the game is to gather 8 cups avoiding obstacles and the Deadly Black Turbos (black cars to you and me). Or, as the review says, 'Transam follows the 
	tradition of quality graphics and original aims... there are four car controls and also pause.'. <br />The lessons will take us through game configuration, animation, graphics handling, tile maps, collision detection, path-finding, game control, amongst others.
	<a name="software"></a>
	<h1>Software and Libraries</h1>
	The tutorial uses the following libraries for development of the game:
	<ul><li>Allegro 4.2</li>
	<li>AXL. A series of modules for helping with Allegro configuration, animation, graphics and game control. The main menu consists of a full AXL explanation. AXL also uses the tinyXML library for XML file handling and (optionally if it exists) FBlend</li>
	<li>Mappy. A tile map engine (this will become clear later, but is basically a way to represent a large map using a grid of numbers, each number representing a specific graphic (or tile), and each tile being the same size)</li>
	</ul>
	Excluding Allegro, all of this software is included in the download. The Mappy playback library is a single file that performs all tile map activities, such as loading a game map, displaying it, etc. and is included here. To initially create 
	a map you need a map editor, this is not included. The first or second lesson creates a fly-by to show the map, so the editor is not necessary. But obviously you'll need it for tinkering and creating your own.<br />
	Currently a binary version exists only for Windows but works under Wine. However, the source code is available that can be compiled against winelib. Get the editor from <a href="http://www.tilemap.co.uk/mappy.php">www.TileMap.co.uk</a>. A beta JAVA version is available too. Older versions for DOS exist, and possibly an OSX version, though I don't know what this download is.
	<a name="download"></a>
	<h1>Download</h1>
	<a name="install"></a>
	You have a number of options:
	<ul>	<li>Tutorial and libraries only. Download it <a href="http://retrospec.sgn.net/users/nwalker/AXL/tutorial.zip">here</a></li>
<li>Full system. This is the above tutorial plus extra tutorials and documentation for AXL. Get this from <a href="http://retrospec.sgn.net/game-links.php?link=axl">AXL Download</a>. Either 'Library and Docs' which includes compiled Windows samples, 
or 'Library and Docs (SRC)' which does not include Windows executables. If you only want to follow the tutorial, get the above not this one.</li>
	</ul>
	<h1>Installation</h1>
	<ul><li>If you have downloaded the full AXL system, then simply unzip</li>
	<li>If you do not have AXL and have downloaded only the tutorial then simply unzip</li>
	<li>If you already have AXL and have downloaded the tutorial then unzip in the root directory where AXL is stored so that you overwrite files and directories - keeping the same structure - resulting in an extra 'tranzam' directory below the 'AXL_Projects\tests' directory. Note, this tutorial may include different (more up to date) AXL files that should replace what you already have</li>
	</ul>
	<a name="setup"></a>
	<h1>Setup</h1>
	Within the 'AXL_Projects\tests' directory is a directory called 'tranzam'. It contains the following directories:
	<ul>
		<li>(root): the XML files (*.xml), the game's tile map (tranzam.fmp) and the the compiled game you make (if you choose to make it here)</li>
		<li>gfx: the graphics used in the game</li>
		<li>develop: the code for each of the tutorials</li>
	</ul>
	The <strong>develop</strong> directory contains all the files necessary for compiling and running the tutorials. 
	The idea of the tutorials is that each one builds upon the previous to form the game in simple steps. 
	The 'develop' directory contains the following sub-directories:
	<ul>
		<li>design resources: these are resouces used in the development, a kind of scratch pad area</li>
		<li>code\libraries: the extra libraries tranzam requires (mappy tile mapping system)</li>
		<li>code\temp: temporary folder, e.g. for storing your partial link files, etc.</li>
		<li>code\versionx: the code/data for that lesson/tutorial</li>
	</ul>
	When a new lesson is started (lessons are listed in the menu to the left under 'Tutorial') it will have a version number, e.g. 'version1'. 
    All the files for that lesson are stored in that directory. The files will include header files (*.h), source code (*.cpp) and make files that
    target a few compilers (*.vcproj for Visual Studio 2005/VC8, *.dev for Dev-C++, 'makefile' for gnu make or similar.)
	<h2>Manual Project Creation</h2>
	If you are not using any of the above systems (Visual Studio 2005/VC8, DevC++, make) or the make file does not work for you, or you have moved 
    some files around, do the following:
	<ul>
		<li>Create a standard Allegro project/make file</li>
		<li>Add to the compile list all of the axl_*.cpp files in the root of 'AXl_Projects directory (three files)</li>
		<li>Add to the compile list all of the tinyxml*.cpp files in the AXL_Projects\extern\tinyxml_minimum directory (four files)</li>
		<li>Add to the compile list mappyal.c in the AXL_Projects\tests\tranzam\develop\code\libraries directory</li>
	</ul>
	<strong>NOTE:</strong>mappyal.c *must* be compiled as a C file (don't ask me why). Because Dev-C++ is a bit crap (it cannot target c++ and c files in the same project), it is for this reason that the DevC++ project uses the pre-built mappyal.o file. Add the
    mappyal.a file to your Dev-C++ project. If your compiler is like this, compile all cpp files as C++ and mappyal.c as a C file.<br />
	<br />
	What you waiting for? Click on Article 1 for the first lesson.
    
    <h1>Lessons</h1>
    <p>The lessons are broken down as follows:</p>
    <ol>
    <li>Setting up our game's framework, ensuring it compiles and displaying a graphic</li>
    <li>Loading the map and scrolling it</li>
    <li>Defining and placing the car</li>
    <li>Updating the Car's fuel, temperature, speed and distance</li>
    <li>Adding a menu system and using the AXL Configuration class</li>
    <li>Bringing the Map alive, changing animations, countdown timers</li>
    <li>Adding national and local radar</li>
    <li>Placing and creating Enemy Cars</li>
    <li>the A-Star algorithm</li>
    <li>Applying A-Star to the enemies</li>
    <li>Moving the enemies</li>
    <li>To finish</li>
    </ol>
	</div>
</body>
</html>